package com.ants.modules.sensitiveWord.entity;

import com.ants.common.annotation.Dict;
import com.ants.modules.sensitiveWord.utils.SensitiveWordModeEnum;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * TODO   敏感词库
 * Author Chen
 * Date   2021/10/18 18:44
 */
@Data
@TableName(value = "sensitive_word")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "敏感词库", description = "敏感词库")
public class SensitiveWord implements Serializable {
    /**
     * ID
     */
    @TableId
    private String id;

    /**
     * 敏感字
     */
    private String word;

    /**
     * 分类：谩骂脏话、政治
     */
    @Dict(dicCode = "sensitive_word_type")
    private String type;

    /**
     * 替换符
     */
    private String repl;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private String updateBy;

    /**
     * 修改时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

}
